<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ng-repate = (k,v) in data track by $index </title>
    <script src="../angular.js"></script>
</head>
<body>
<div ng-app="gg" ng-controller="ctrl">
    <ul>
        <!--angular 在循环是不允许有相同数据-->
        <!--track by $index 在循环有相同数据时使用-->
        <li ng-repeat="(k,v) in data track by $index">
            {{$index}}
            {{v}}
        </li>
    </ul>
</div>

<script>
    var mod = angular.module('gg', []);
    mod.controller('ctrl', ['$scope', function ($scope) {
        $scope.data = ['111', '222', '333', '333'];
    }])
</script>
</body>

</html>